<?php echo $enableImageLink? '<a href="'.$row->link.'" title="'.$row->title.'">'.$row->mainImage.'</a>':$row->mainImage; ?> 